-
Notifications
You must be signed in to change notification settings - Fork 195
feat: argument to disable linting of ( for auto-printing
#2919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * `object_usage_linter()` lints missing packages that may cause false positives (#2872, @AshesITR) | ||
| * New argument `include_s4_slots` for the `xml_find_function_calls()` entry in the `get_source_expressions()` to govern whether calls of the form `s4Obj@fun()` are included in the result (#2820, @MichaelChirico). | ||
| * `sprintf_linter()` lints `sprintf()` and `gettextf()` calls when a constant string is passed to `fmt` (#2894, @Bisaloo). | ||
| * `implicit_assignment_linter()` gains argument `allow_print` to disable lints for the use of `(` for auto-printing (#2919, @TimTaylor). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think allow_implicit_print may be better, WDYT? My only hesitation is doubling "implicit" in the linter & argument names...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow_bracket_print?
I'm already wary of implicit as a description as it already doesn't reflect how I think of my usage of this lint ... basically "stop people accidentally using <- in function calls". I'd prefer not to use the term more if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call it allow_paren_print
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2919 +/- ##
=======================================
Coverage 99.24% 99.24%
=======================================
Files 129 129
Lines 7282 7285 +3
=======================================
+ Hits 7227 7230 +3
Misses 55 55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Feels like a false positive to me - maybe we don't need an argument for this? IINM this only removes top-level |
That would be great but the custom print error message seems like it was a deliberate choice to lint for.
I believe so (but take my agreement with caution as I deliberately avoided delving in to the XPath logic due to the pre-existing custom error). |
|
Oh, I see, sorry. |
* Fix false positive for null coalescing without else clause Signed-off-by: Emmanuel Ferdman <[email protected]> * cite in NEWS --------- Signed-off-by: Emmanuel Ferdman <[email protected]> Co-authored-by: Michael Chirico <[email protected]>
* Partial fix for upcoming testthat release `expect_success()` and `expect_failure()` now test that you have exactly one success/failure and zero failures/successes. I can't quite figure out why the tests are still failing here; maybe it's something to do with recycling? I'm happy to help but I unfortunately I don't know enough about the lintr internals to figure out what's going wrong here. We're planning to submit testthat to CRAN on Nov 10. * simple delint * extract to helper for cyclo complexity * avoid testthat::expect() again * fail() needs return() --------- Co-authored-by: Michael Chirico <[email protected]>
* Don't lint T and F if followed by `[`. * Address review comments. * subsume into same expr[] as $ and @ --------- Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
* Lint nrow, ncol, NROW and NCOL with logical expressions. * Address review comments. * Fix indentation. * tidy up tests --------- Co-authored-by: Michael Chirico <[email protected]>
* Make the message from cyclocomp_linter() more actionable. * Revert output changes. --------- Co-authored-by: Michael Chirico <[email protected]>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
Sorry, rebased in my branch and have messed this up. Will resubmit and reference this. |
closes r-lib#2916 supersedes r-lib#2919
Adds an argument to
implicit_assignment_linterto disable linting of(for auto-printing.closes #2916